Solving Regular Tree Grammar Based Constraints
نویسندگان
چکیده
This paper describes the precise speci cation, design, analysis, implementation, and measurements of an e cient algorithm for solving regular tree grammar based constraints. The particular constraints are for dead-code elimination on recursive data, but the method used for the algorithm design and complexity analysis is general and applies to other program analysis problems as well. The method is centered around Paige's nite di erencing, i.e., computing expensive set expressions incrementally, and allows the algorithm to be derived and analyzed formally and implemented easily. We study higherlevel transformations that make the derived algorithm concise and allow its complexity to be analyzed accurately. Although a rough analysis shows that the worst-case time complexity is cubic in program size, an accurate analysis shows that it is linear in the number of live program points and in other parameters that are typically smaller in practice. Our implementation ranges from two to ten times as fast as a previous implementation of an informally designed algorithm.
منابع مشابه
Solving Systems of Set Constraints with Negated Subset Relationships
W e present a decision procedure, based on tree automata techniques, for satisfiability of systems of set constraints including negated subset relationships. This result extends all previous works on set constraints solving (Heintze and Jaffar [HJ$Oa] ; Aiken and Wimmers [AW$2] ; Gilleron, Tison and Tommasi [GTT93a] ; Bachmair, Ganzinger and Waldmann [BG W$3]) and solves a problem which was lef...
متن کاملAlternating Regular Tree Grammars in the Framework of Lattice-Valued Logic
In this paper, two different ways of introducing alternation for lattice-valued (referred to as {L}valued) regular tree grammars and {L}valued top-down tree automata are compared. One is the way which defines the alternating regular tree grammar, i.e., alternation is governed by the non-terminals of the grammar and the other is the way which combines state with alternation. The first way is ta...
متن کاملOverview of Existing Recurrent Schematizations
Innnite sets of objects with structural similarities appear frequently at diierent places in the theory of equational reasoning, automatic deduction, logic programming, and databases. The objects in such innnite families can have several forms. They are represented most frequently by terms. The formalisms to deal with innnite families are fairly limited. As long as only the representation is co...
متن کاملXPath Typing Using a Modal Logic with Converse for Finite Trees
We present an algorithm to solve XPath decision problems under regular tree type constraints and show its use to statically typecheck XPath queries. To this end, we prove the decidability of a logic with converse for finite ordered trees whose time complexity is a simple exponential of the size of a formula. The logic corresponds to the alternation free modal μ-calculus restricted to finite tre...
متن کاملYakyak: parsing with logical side constraints
Programming language syntax is often described by means of a context-free grammar, which is restricted by constraints programmed into the action code associated with productions. Without such code, the grammar would explode in size if it were to describe the same language. We present the tool YakYak, which extends Yacc with rst-order logic for specifying constraints that are regular tree langua...
متن کامل